﻿/*

  The contents of this file are subject to the Mozilla Public License Version
  1.1 (the "License"); you may not use this file except in compliance with
  the License. You may obtain a copy of the License at 
  
           http://www.mozilla.org/MPL/ 
  
  Software distributed under the License is distributed on an "AS IS" basis,
  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  for the specific language governing rights and limitations under the License. 
  
  The Original Code is PEGAS Framework.
  
  The Initial Developer of the Original Code is
  ALCARAZ Marc (aka eKameleon)  <vegas@ekameleon.net>.
  Portions created by the Initial Developer are Copyright (C) 2004-2009
  the Initial Developer. All Rights Reserved.
  
  Contributor(s) :
  
*/

package pegas.numeric 
{
    import buRRRn.ASTUce.framework.TestCase;
    
    import system.Reflection;
    
    public class TrigoTest extends TestCase 
    {
        public function TrigoTest(name:String = "")
        {
            super(name);
        }
        
        public function testIsFinal():void
        {
            assertTrue( Reflection.getClassInfo(Hyperbolic).isFinal() ) ;
        }
        
        public function testDEG2RAD():void
        {
            assertEquals( Trigo.DEG2RAD , Math.PI / 180 , "The Trigo.DEG2RAD constant failed." ) ;
        }
                
        public function testEPSILON():void
        {
        	assertEquals( Trigo.EPSILON , 0.000000001 , "The Trigo.EPSILON constant failed." ) ;
        }
        
        public function testRAD2DEG():void
        {
            assertEquals( Trigo.RAD2DEG , 180 / Math.PI , "The Trigo.RAD2DEG constant failed." ) ;
        }
        
        public function testPHI():void
        {
            assertEquals( Trigo.PHI , 1.61803398874989 , "The Trigo.PHI constant failed." ) ;
        }
        
        public function testLAMBDA():void
        {
            assertEquals( Trigo.LAMBDA , 0.57721566490143 , "The Trigo.LAMBDA constant failed." ) ;
        }
    }
}
